﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web.Mvc;

namespace SuperStar.Models
{
    

    public class StatusSellingModels
    {
        public SuperStarEntities DB { get; set; }
        public String DEBUGTYPE { get; set; }

        public StatusSellingModels()
        {
            DB = new SuperStarEntities();
        }

        public List<StatusSelling> GetStatus()
        {
            var lStatus = from s in DB.StatusSellings
                          select s;
            return lStatus.ToList();
        }
        public Object GetStatusForReseller()
        {
            var lStatus = (from s in DB.StatusSellings
                           where s.Id == 3 ||  s.Id == 4 || s.Id == 5
                           select s).Select(p => new{
                                Value = p.Id,
                                DisplayText  = p.Name
                           });
            return lStatus.ToList();
        } 
    }
}
